/**
 * 
 */
package com.tza.web.t_net.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiTemplate;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;

/**
 * @author tzammel
 */
public class LogScr extends Composite implements HasText
{

   private static LogScrUiBinder uiBinder = GWT.create(LogScrUiBinder.class);
   @UiTemplate("LogScr.ui.xml")
   interface LogScrUiBinder extends UiBinder<Widget, LogScr>
   {
   }

   ActionContext actionContext;
   @UiField
   TextBox       loginBox;

   public LogScr()
   {
      initWidget(uiBinder.createAndBindUi(this));
   }

   public LogScr(ActionContext mainActionContext)
   {
      initWidget(uiBinder.createAndBindUi(this));

      // Can access @UiField after calling createAndBindUi
      loginBox.setText("Hello");
      // button.setText(firstName);

      actionContext = mainActionContext;
   }

   public void setText(String text)
   {
      // button.setText(text);
   }

   /**
    * Gets invoked when the default constructor is called and a string is
    * provided in the ui.xml file.
    */
   public String getText()
   {
      return loginBox.getText();
   }
}
